1. Field of the Invention
The present invention relates to an apparatus and method for processing images, and more particularly, to an apparatus and method for processing color images.
2. Description of the Related Art
In the field of color image processing and color devices, when someone photographs a scene using a color image input device such as a camera and reproduces the photographed image data using an image output device such as a monitor, or when a display image is downloaded from the Internet, it is important that the color of the reproduced image corresponds with the color of the actual scene. To achieve this, it is an essential point that one obtain the color of an illuminant for illuminating an object (scene illuminant), then a reference white point of the image input device corresponds with the color of the illuminant, and that one processes the illuminant color in the white point of an image to be reproduced and in the color temperature of an display device, which reproduce the image.
In most general cameras, all circuits of the cameras are adjusted using one or two reference illumination sources, therefore, there are problems that when an object is photographed under illuminants other than the reference illuminant, the color of the image reproduced by the image output device is different from that of the scene image, and that as the difference of illuminant colors or color temperatures between the reference illuminant of the camera and the scene illuminant becomes greater, the difference in colors between the reproduced image and the object becomes greater. Also, there is a problem that even if the illuminant of the object corresponds with the reference illuminant of the camera, in the case that the illuminant of the object is different from the color temperature of a cathode ray tube of a monitor on which the image photographed by the camera is displayed, color variation due to the difference of the color temperature may occur.
As a common conventional method of matching the color of an actual scene image with the color of reproduced image, a user adjusts color tone, luminosity and color saturation of the three primary colors of red, green and blue (RGB) on the monitor with the help of image processing software, such as Photoshop of Adobe Co., so that the user can see that the colors of the scene image match those of the reproduced image.
However, it is generally difficult to obtain an optimum RGB rate for color matching between two images, and more difficult to overcome problems due to imbalance of illuminants which used for adjustment of colors, by color adjustments.
A method for matching the color of the scene illuminant with the white balance of the image input device, which are essential for matching the colors of two images, is partially adopted by the camera. For instance, a method using an optical sensor is disclosed in U.S. Pat. Nos. 4,616,253 and 4,805,010. In these patents, optical sensors for detecting illuminant color components irradiating an object are installed in the camera, or are provided as independent devices. A user obtains color coordinates of the illuminant color emitted from the illumination source by the sensors, and sets camera reference illuminant as white balance measured by the sensor based on the obtained color coordinates to thereby obtain an optimum scene image. However, this method has problems of increased costs due to use of the optical sensor, and of difficulties in adopting to images from distant areas where sensors cannot be installed. Also, there is a restriction that the camera should be a high-class goods, which is possible to perform a white balance control. Further, there is a disadvantage that color matching of color images formed by input devices other than a pre-specified camera cannot be accomplished.
A conventional method for estimating illuminant colors regardless of the type of image input device is disclosed in U.S. Pat. No. 4,685,071. According to this method, illuminant colors are detected from the color image itself. That is, according to the method, in order to detect a change of colors having independent brightness using specularly reflected light (highlight) from an image, an image is converted to a color coordinate space having a chromaticity coordinate. Then, a color boundary where both color saturation and color tone are most abruptly changed, is detected, and the illuminant color is detected using data sets around the boundary due to a change of the color saturation. Here, for determining the boundary causes from the change of the color saturation or the change of the color tone, the data sets around both sides of the boundary point are collected, and then the collected data sets are linearly approximated. If the inclinations of the straight lines obtained by the data sets collected from both sides are equal, it is determined that the boundary is caused by the color saturation and uses the data sets for detecting illuminant color, and a variable determined as the illuminant color is obtained by a path of intersecting points of the straight lines obtained from the data sets around the boundary due to the change of the color saturation. But, the above method has a disadvantage that it requires an excessively long processing time.
Also, there are other disadvantages in that it is not easy to collect the data sets from either side of each of the boundary points, and that because the data sets are processed in unit of a boundary point unit, collecting of data on both sides from various boundary points, linear approximating, comparing, and determining must be iterated. Also, there is a problem that various effective highlights for calculation of illuminant colors must exist on the chromaticity.
Another conventional method is disclosed in U.S. Pat. No. 5,495,428. According to the method, image data is projected onto a chromatic space histogram to find a straight line which is an impetus for determining an illuminant color, straight lines with respect to each of clusters are calculated on the chromatic space, and the chromatic values at positions where the straight lines converge are obtained. Although detecting a change of boundaries in the above method is not complicated method of, straight lines with respect to all clusters must be calculated which requires much time. Also, when the colors of objects in the image are similar, the clusters may make a lump to thereby deteriorate precision, and stable illuminant colors require the existence of strong highlight information in the image.
FIG. 1 is a block diagram of the structure of a typical image processing system for illustrating various processes of generating and reproducing an image. Referring to FIG. 1, a scene of a person standing next to a tree irradiated by an arbitrary illuminant. The scene can be photographed by a camera set to an arbitrary reference illuminant having color temperature of 5000 K, or 7500 K. Also, an image printed in the form of a silver salt photograph can be read by an image scanner having an illuminant of color temperature of 2800 K. Also, the image may be download from an Internet site in which case the image input device cannot be defined. The image data obtained by the above-mentioned methods are displayed on an arbitrary image output device by a computer or an image processing device. Here, color temperatures of monitors may be set differently. That is, the scene image is sole, but images displaying on the monitor may have different colors due to difference from that of the image input device, and a difference in color temperatures between image data having an arbitrary light source and a monitor.
It is an object of the present invention to provide an apparatus for processing color images by which the difference in colors between a actual scene and a reproduced image of the scene can be stably matched regardless of the components of the image, and the types of the image input device.
It is another object of the present invention to provide a method for processing color images which is used in the apparatus for processing color images.
Accordingly, to achieve the first object, the apparatus for processing color images, which receives RGB signals output from an image input device and processes the received RGB signals to thereby output images to a display means, comprising: a color conversion unit for white-transforming signals in RGB space; wherein, the color conversion unit includes, a first white-transforming means for white-transforming signals in RGB space to signals in a predetermined color space using N predetermined illuminant colors; and a second white-transforming means for white-transforming the signals in the predetermined color space to the signals in RGB space using M predetermined color temperatures of the display means.
Preferably, the color image processing apparatus further comprises: a first frame memory means for buffering the received RGB signals and outputting the buffered signals; an image sampling unit for receiving the RGB signals output from the first frame memory means and down-sampling the received RGB signals and further outputting a down-sampled RGB signals; and a second frame memory means for buffering the down-sampled RGB signals and outputting the buffered down-sampled RGB signals.
It is also preferable that the color conversion unit comprises: a first operation unit including N matrix operators connected in parallel to calculate matrices for white-transformation of the signals in RGB space to signals in predetermined color space using N predetermined illuminant colors.
It is further preferable that the color conversion unit further comprises: a second operation unit including M matrix operators connected in parallel to calculate matrices for white-transformation of the signals in the predetermined color space to the signals in RGB space using each M predetermined color temperature.
Preferably, the color conversion unit comprises a first memory for storing information of the matrices for performing white-transformation of the signals in RGB space to the signals in a predetermined color space using N predetermined illuminant colors, and outputting the information in response to a first control signal, and a first matrix operation unit for operating the matrices in accordance with the information output from the first memory. The color conversion unit further comprises: a second memory for storing information of the matrices for performing white-transformation the signals in the predetermined color space to the signals in a RGB color space using M predetermined color temperature for display means, and outputting the information in response to a second control signal, and a second matrix operation unit for operating the matrices in accordance with the information output from the second memory. The predetermined color space is a standard color space and the predetermined space is a color space which has a relationship that the magnitude of the transformed signal in the color space and the magnitude of signal in original color space is linear.
The N predetermined representative illuminant colors of the color conversion unit are obtained by selecting at least one color temperature from a group consisting of 2800 K, 4300 K, 5000 K, 5500 K, 6500 K, and 7500 K, which can be easily distinguished by person""s eyes, and are frequently used in ordinary.
The color conversion unit converts a light source using Formula 9, when the color temperature of the illuminant is known.
To achieve the second object, the method for processing color images includes the steps of: (a) white-transforming signals in RGB space using N predetermined eliminant colors; (b) displaying a plurality of images by the white-transformed signal on the display means; (c) selecting the most visually preferred image from the images; and (d) determining the illuminant color corresponding to the selected image in step (c) as optimum illuminant color.
Preferably, the step (a) includes: (a-1) white-transforming signals in RGB space to signals in a predetermined color space using N predetermined illuminant colors; and (a-2) white-transforming the signals in the predetermined color space to the signals in RGB space using M predetermined color temperatures.
It is also preferable that the N predetermined representative illuminant colors in step (a) are obtained by selecting at least one color temperature from the group consisting of 2800 K, 4300 K, 5000 K, 5500 K, 6500 K, and 7500 K, which can be easily distinguished by men""s eyes, and are frequently used in routine life.
It is further preferable that the predetermined space in step (a) is a color space which has a relationship that the magnitude of transformed signal in the color space and the magnitude of signal in original color space is linear.
The predetermined color space in step (a) is a color space selected from the group of standard color spaces recommended by CIE, CIEXYZ, CIEUVW, and color spaces adopt UV chromaticity coordinate space and Y, R-Y, B-Y coordinate space.